<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/9/27
  Time: 11:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    request对象:（请求对象，获取浏览器发送过来的请求信息）
    数据类型：HttpServletRequest(ServletRequest)
    <%
        //获取服务器的协议
        String scheme = request.getScheme();
        //获取服务器的IP地址
        String serverName = request.getServerName();
        //获取服务器的端口号
        int serverPort = request.getServerPort();
        //获取客户端的IP地址
        String remoteAdder = request.getRemoteAddr();
        //获取客户端的完整主机名
        String remoteHost = request.getRemoteHost();
        //获取客户端的端口号
        int remotePort = request.getRemotePort();
        //返回请求行中的参数部分
        String uri = request.getRequestURI();
        out.print(scheme+"<br/>");
        out.print(serverName+"<br/>");
        out.print(serverPort+"<br/>");
        out.print(remoteAdder+"<br/>");
        out.print(remoteHost+"<br/>");
        out.print(remotePort+"<br/>");
        out.print(uri+"<br/>");
    %>
</body>
</html>
